package com.thb.pay.api.order;

import com.thb.pay.api.order.fallback.MchTradeOrderServiceApiFallbackFactory;
import com.thb.pay.api.order.vo.req.MchTradeOrderPageReq;
import com.thb.pay.api.order.vo.req.MchTradeOrderReq;
import com.thb.pay.api.order.vo.resp.MchTradeOrderCountVo;
import com.thb.pay.api.order.vo.resp.MchTradeOrderVo;
import com.thb.pay.core.utils.PageResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * @Description:
 * @Auther: huanglc
 * @Date: 2019-10-23 18:14
 */

@FeignClient(value = "pay-service", fallbackFactory = MchTradeOrderServiceApiFallbackFactory.class)
@RequestMapping("/mchAccountServiceApi")
public interface MchTradeOrderServiceApi {


    @RequestMapping(value = "/findPage", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    PageResult<MchTradeOrderVo> findPage(@RequestBody MchTradeOrderPageReq pageReq);

    @RequestMapping(value = "/getById", method = RequestMethod.GET)
    MchTradeOrderVo getById(@RequestParam("id") Long id);

    @RequestMapping(value = "/count", method = RequestMethod.GET, consumes = MediaType.APPLICATION_JSON_VALUE)
    MchTradeOrderCountVo count(@RequestBody MchTradeOrderReq paramReq);

}
